entrycompletion: set the GtkWindow as attached to the GtkEntry
authorCosimo Cecchi <cosimoc@gnome.org>
Thu, 19 Sep 2013 20:35:00 +0000 (13:35 -0700)
committerMatthias Clasen <mclasen@redhat.com>
Thu, 26 Sep 2013 00:06:43 +0000 (20:06 -0400)
This way themes can easily select that window to apply custom styles.

https://bugzilla.gnome.org/show_bug.cgi?id=708414

gtk/gtkentrycompletion.c

index 582287a422bf0f7b3d1d46352720eb12846fed52..c947210f7f58de4481a171f22e9b40a839ddabcc 100644 (file)
@@ -2683,6 +2683,8 @@ _gtk_entry_completion_disconnect (GtkEntryCompletion *completion)
 
   unset_accessible_relation (completion->priv->popup_window,
                              completion->priv->entry);
+  gtk_window_set_attached_to (GTK_WINDOW (completion->priv->popup_window),
+                              NULL);
 
   completion->priv->entry = NULL;
 }
@@ -2695,6 +2697,8 @@ _gtk_entry_completion_connect (GtkEntryCompletion *completion,
 
   set_accessible_relation (completion->priv->popup_window,
                            completion->priv->entry);
+  gtk_window_set_attached_to (GTK_WINDOW (completion->priv->popup_window),
+                              completion->priv->entry);
 
   connect_completion_signals (completion);
 }